import { get, post, put, del } from '@/utils/request'

// 获取标签列表
export const getTagsAPI = () => {
  return get('/api/tags')
}

// 获取标签详情
export const getTagDetailAPI = (id) => {
  return get(`/api/tags/${id}`)
}

// 创建标签
export const createTagAPI = (data) => {
  return post('/api/tags', {
    name: data.name,
    color: data.color
  })
}

// 更新标签
export const updateTagAPI = (id, data) => {
  return put(`/api/tags/${id}`, data)
}

// 删除标签
export const deleteTagAPI = (id) => {
  return del(`/api/tags/${id}`)
}

// 获取热门标签
export const getPopularTagsAPI = () => {
  return get('/api/tags/popular')
}

// 获取标签统计
export const getTagStatsAPI = () => {
  return get('/api/tags/stats')
} 